﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Products.aspx.cs" Inherits="Products" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">

</asp:Content>

<asp:Content ID="Content3" runat="server" ContentPlaceHolderID="shoppingCartContent">
<div id="shopping-cart" style="margin-left: 2px;">
	 <p class="Title-menu">Shopping cart</p>
	<div id="total-cost" style="padding: 16px 0pt;">
		<table width="100%">
			<tr>
			  <td colspan="2" class="gio1"><div style="float:left;">&nbsp;Quantities:</div>
			  
				  <DIV class="style52" style="text-align:right; float:right; padding-right:2px" id="QuantityCart">
					<% =totalQuantity %>
				  </DIV>
				  </td>  
			</tr>
			<tr>
			  <td class="gio1">&nbsp;Total Price:</td>
			  <td colspan="2" align="right" class="gio1"><span class="style52" id="PriceCart">
					<% =String.Format("{0:C}", totalPrice)%>
			  </span></td>
			</tr>
			<tr>
				<td  colspan="2" align="center">
					<a href="ShoppingCartView.aspx"><img src="Images/AddToCard.png" width="19" height="16" alt="error" style="vertical-align:bottom;"/>Go to Cart</a>
				</td>
			</tr>
		</table>
	</div>
</div>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server" >
    <div id="Title">
Product<div>Search : <asp:TextBox ID="TextBox1" runat="server" Width="299px"></asp:TextBox>&nbsp;<asp:Button 
            ID="Button1" runat="server" onclick="Button1_Click" Text="Search" />
        <asp:Button ID="Button2" runat="server" onclick="Button2_Click" 
            Text="Show All" />
    </div>
</div>
<div id="content">
    <table width="560px">
    <tr>
    <td align="center">
            <asp:DataList ID="dlProduct" runat="server" RepeatColumns="3" 
                RepeatDirection="Horizontal" 
                DataKeyField="ProductID">
                <HeaderStyle HorizontalAlign="Left" BackColor="#3D7169" ForeColor="#FFFFFF" />
				<FooterStyle HorizontalAlign="Right" BackColor="#6C6B66" ForeColor="#FFFFFF" />
                <AlternatingItemStyle />
                <ItemTemplate>
                    <div class="item" style="padding:15,15,15,15">
                        <div class="item_image"><a href="ProductDetail.aspx?pid=<%# Eval("ProductID") %>"><asp:Image ID="Image1" runat="server" CssClass="" ImageUrl ='<%# DataBinder.Eval(Container.DataItem, "imageLink") %>' ImageAlign="Middle" /></a></div>
                        <div class="item_info">
                            <p><span>Name:</span> <%# DataBinder.Eval(Container.DataItem,"ProductName") %></p>
                            <p><span>Supplier:</span> <%# DataBinder.Eval(Container.DataItem, "Supplier.CompanyName")%></p>
                            <p><span>Price: </span> <%# DataBinder.Eval(Container.DataItem,"ProductPrice","{0:c}") %></p>
                        </div>
                        <div style="text-align:center;">
                        <span class='style51'><img class="item_button_cart" src="Images/home-depot-add.gif" title="Add To Cart" alt="Error"  onclick="CallAjax(<%# Eval("ProductID") %>,1)" /></span>
                        </div>
                    </div>
                </ItemTemplate>
            </asp:DataList>
        </td></tr>
        </table>
        </div> <!-- End Content -->
        
</asp:Content>